<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>03-利用类选择器画盒子</title>

  <style>
    .red {
      width: 100px;
      height: 100px;
      /* 设置背景颜色 */
      background-color: red;
    }

    .green {
      width: 100px;
      height: 100px;
      background-color: green;;
    }
  </style>

</head>
<body>

  <div class="red">红色</div>
  <div class="green">绿色</div>
  <div class="red">红色</div>
  
</body>
</html>